﻿// See https://aka.ms/new-console-template for more information
using SendMailEX;

//Console.WriteLine("Hello, World!");

Console.WriteLine("准备发邮件");

List<string> toAddress = new List<string>();
toAddress.Add("XXXXXX@qq.com");

List<string> ccAddress = new List<string>();
ccAddress.Add("595XXXXXX0705@qq.com");




//指定对应的值
// SendMailExQQ.MailUserName = "xxxxxxxx@qq.com";
// SendMailExQQ.MailName = "邮箱显示名";
// SendMailExQQ.MailPassword = "xxxxxxxxxxxxxxxx";
// SendMailExQQ.MailServer = "pop.qq.com";
// SendMailExQQ.enableSsl = true;
// SendMailExQQ.smtpPort = 587;
// SendMailExQQ.emailIsBodyHtml = true;
// SendMailExQQ.emailEncoding = "UTF-8";
string emailSubject = "test subject";
string emailBody = "test body";

//发送邮件，发送成功时i为true
//支持多收件人，多抄送人，多密抄人
bool i = SendMailExQQ.Send(emailSubject,emailBody,toAddress.ToArray(),ccAddress.ToArray());

//单一收件人
// bool j = SendMailExQQ.Send(emailSubject,"TEST BODY","59540705@qq.com","59540705@qq.com");

Console.WriteLine(i);
Console.ReadLine();
